<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'machine-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'hostname'); ?>
		<?php echo $form->textField($model,'hostname',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'hostname'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'aliasname'); ?>
		<?php echo $form->textField($model,'aliasname',array('size'=>20,'maxlength'=>20)); ?>
		<?php echo $form->error($model,'aliasname'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'ip'); ?>
		<?php echo $form->textField($model,'ip',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'ip'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'remark'); ?>
		<?php echo $form->textField($model,'remark',array('size'=>60,'maxlength'=>500)); ?>
		<?php echo $form->error($model,'remark'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'status'); ?>
		<?php echo $form->textField($model,'status'); ?>
		<?php echo $form->error($model,'status'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'flag'); ?>
        <?php echo CHTML::activeDropDownList($model,'flag', CHtml::listData(CActiveRecord::model('Machinetype')->findAll(),'id', 'type')); ?>
		<?php echo $form->error($model,'flag'); ?>
	</div>
<!--
	<div class="row">
		<?php echo $form->labelEx($model,'conn'); ?>
		<?php echo $form->textField($model,'conn'); ?>
		<?php echo $form->error($model,'conn'); ?>
	</div>
-->
	<div class="row">
		<?php echo $form->labelEx($model,'workgroup'); ?>
        <?php echo CHTML::activeDropDownList($model,'workgroup', CHtml::listData(CActiveRecord::model('Workgroup')->findAll(),'id', 'groupname')); ?>
		<?php echo $form->error($model,'workgroup'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'director'); ?>
		<?php echo $form->textField($model,'director',array('size'=>30,'maxlength'=>30)); ?>
		<?php echo $form->error($model,'director'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'system'); ?>
		<?php echo $form->textField($model,'system',array('size'=>60,'maxlength'=>1000)); ?>
		<?php echo $form->error($model,'system'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'cpu'); ?>
		<?php echo $form->textField($model,'cpu',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'cpu'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'mem'); ?>
		<?php echo $form->textField($model,'mem',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'mem'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'disk'); ?>
		<?php echo $form->textField($model,'disk',array('size'=>20,'maxlength'=>20)); ?>
		<?php echo $form->error($model,'disk'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'network'); ?>
		<?php echo $form->textField($model,'network',array('size'=>20,'maxlength'=>20)); ?>
		<?php echo $form->error($model,'network'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'os'); ?>
		<?php echo $form->textField($model,'os',array('size'=>20,'maxlength'=>20)); ?>
		<?php echo $form->error($model,'os'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'isentity'); ?>
		<?php echo $form->textField($model,'isentity'); ?>
		<?php echo $form->error($model,'isentity'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'handle'); ?>
		<?php echo $form->textField($model,'handle'); ?>
		<?php echo $form->error($model,'handle'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->
